package org.sakai.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.sakai.entity.Patient;

import java.util.List;

/**
* @author Sakai
* @description 针对表【patient】的数据库操作Mapper
* @createDate 2025-06-21 11:12:28
* @Entity org.sakai.entity.Patient
*/
@Mapper
public interface PatientMapper {

    int deleteByPrimaryKey(String id);

    int insert(Patient record);

    int insertSelective(Patient record);

    Patient selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(Patient record);

    int updateByPrimaryKey(Patient record);

    @Select("select * from patient where id = #{patientId} and user_id = #{userId}")
    Patient selectByUserIdAndPatientId(String userId, String patientId);

    @Select("select * from patient where user_id = #{userId}")
    List<Patient> getPatientList(String userId);
}
